Telegram Group & Telegram Channel
Note #10 Напоминание самому себе:

В Go можно делать вызов метода, напрямую используя тип:

package main

import (
"fmt"
)

type Person struct {
Name string
}

func (p Person) Say() {
fmt.Println("Go for two me and", p.Name)
}

func main() {
p := Person{"%username%"}
// Все варианты эквивалентны
p.Say()
Person.Say(p)
(Person).Say(p)
f1 := Person.Say; f1(p)
f2 := (Person).Say; f2(p)
}

links:
[1] https://play.golang.org/p/5TbFC1DsZyy
[2] https://golang.org/ref/spec#Method_expressions



tg-me.com/golang_for_two/34
Create:
Last Update:

Note #10 Напоминание самому себе:

В Go можно делать вызов метода, напрямую используя тип:

package main

import (
"fmt"
)

type Person struct {
Name string
}

func (p Person) Say() {
fmt.Println("Go for two me and", p.Name)
}

func main() {
p := Person{"%username%"}
// Все варианты эквивалентны
p.Say()
Person.Say(p)
(Person).Say(p)
f1 := Person.Say; f1(p)
f2 := (Person).Say; f2(p)
}

links:
[1] https://play.golang.org/p/5TbFC1DsZyy
[2] https://golang.org/ref/spec#Method_expressions

BY 🇺🇦 Go for two :)




Share with your friend now:
tg-me.com/golang_for_two/34

View MORE
Open in Telegram


🇺🇦 Go на двоих Telegram | DID YOU KNOW?

Date: |

To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.

Start with a fresh view of investing strategy. The combination of risks and fads this quarter looks to be topping. That means the future is ready to move in.Likely, there will not be a wholesale shift. Company actions will aim to benefit from economic growth, inflationary pressures and a return of market-determined interest rates. In turn, all of that should drive the stock market and investment returns higher.

🇺🇦 Go на двоих from us


Telegram 🇺🇦 Go for two :)
FROM USA